package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbAccountingMapper;
import com.bsb.base.model.BsbAccounting;
import com.bsb.base.model.BsbAccountingExample;

@Service
public class BsbAccountingService{
	
	@Resource
	private BsbAccountingMapper bsbAccountingMapper;
	
	public void addBsbAccounting(BsbAccounting bsbAccounting) {
		bsbAccountingMapper.insertSelective(bsbAccounting);
	}
	
	public void delBsbAccountingById(Integer id) {
		bsbAccountingMapper.deleteByPrimaryKey(id);
	}
	
	public void updateBsbAccounting(BsbAccounting bsbAccounting) {
		bsbAccountingMapper.updateByPrimaryKeySelective(bsbAccounting);
	}
	
	public void updateBsbAccountingByExample(BsbAccounting bsbAccounting,BsbAccountingExample bsbAccountingExample){
	    bsbAccountingMapper.updateByExampleSelective(bsbAccounting,bsbAccountingExample);
	}
	
	public BsbAccounting getBsbAccountingById(Integer id) {
		return bsbAccountingMapper.selectByPrimaryKey(id);
	}
	
	public List<BsbAccounting> getPageBsbAccounting(BsbAccountingExample bsbAccountingExample) {
		return bsbAccountingMapper.selectPage(bsbAccountingExample);
	}
	
	public int countBsbAccounting(BsbAccountingExample bsbAccountingExample) {
		return bsbAccountingMapper.countByExample(bsbAccountingExample);
	}
	
	public List<BsbAccounting> selectByExample(BsbAccountingExample example){
	    return bsbAccountingMapper.selectByExample(example);
	}
}
